<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改手机邮箱</title>
<script type="text/javascript" src="js/jquery-easyui-1.5.4.2/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery-easyui-1.5.4.2/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="js/jquery-easyui-1.5.4.2/jquery.easyui.min.js"></script>
<link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.5.4.2/themes/icon.css"/>
<link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.5.4.2/themes/black/easyui.css"/>
<link rel="stylesheet" type="text/css" href="css/taojin/layout.css"> 
</head>
<body>
<script type="text/javascript">
	
	$(function(){
		$.extend($.fn.validatebox.defaults.rules, {
			telephone : {
				validator : function(value, param) {
					var reg = /^[1][3,4,5,7,8][0-9]{9}$/;
					return reg.test(value);
				},
				message : '手机号码格式不正确'
			}
		});
		
		$("#editEmailTel-button").linkbutton({
			onClick:function(){
				$("#editEmailTel-form").form({
					url:'editEmailTel',
					method:'post',
					onSubmit:function(param){
						return $(this).form('validate');
					},
					success:function(data){
						if (data=='true') {
							$.messager.alert('提示',"修改成功!");
							$("#empTel").passwordbox('clear');
							$("#empEmail").passwordbox('clear');
						}else {
							$.messager.alert('警告',"修改失败!");
							$("#empTel").passwordbox('clear');
							$("#empEmail").passwordbox('clear');
						}
					}
				}).submit();
			}
		});
		
		
	})
	
	</script>
	<div id="index-layout-base" class="easyui-layout" data-options="fit:true,border:false" >
		<div data-options="region:'center'">
			<div style="height: 350px;width: 520px;border: 1px solid white;border-radius: 5px;margin-left: 200px;margin-top: 50px;">
				<div style="padding-top: 50px;padding-left: 70px;">
					<input id="empUsername" name="empUsername" class="easyui-textbox" style="font-size: 18px;background-color: #EEEEEE"
						data-options="label:'用户名:',labelWidth:55,width:350,height:35,readonly:true" value="${empUsername}">
				</div>
				<div style="padding-top: 15px;padding-left: 80px;">
					<input id="empName" name="empName" class="easyui-textbox" style="font-size: 18px;"
						data-options="label:'姓名:',labelWidth:45,width:340,height:35,readonly:true" value="${empName}">
				</div>
			<form method="post" id="editEmailTel-form">
				<div style="padding-top: 15px;padding-left: 55px;">
					<input id="empTel" name="empTel" class="easyui-textbox" style="font-size: 18px;"
						data-options="label:'手机号码:',labelWidth:70,width:365,height:35,required:true,validType:'telephone',
						validateOnCreate:false">
				</div>
				
				<div style="padding-top: 15px;padding-left: 55px;">
					<input id="empEmail" name="empEmail" class="easyui-textbox" style="font-size: 18px;"
						data-options="label:'电子邮箱:',labelWidth:70,width:365,height:35,required:true,validType:'email',
						validateOnCreate:false">
				</div>
				
		</form>
				<div style="padding-left: 210px;padding-top: 50px;font-size:20px;">
					<a id="editEmailTel-button" class="easyui-linkbutton" 
					style="height: 40px;width: 100px;"
						data-options="text:'提交'"></a>
				</div>
				
		</div> 
    </div>
</body>
</html>